package com.leyou.user.controller;

import com.leyou.item.pojo.Sku;
import com.leyou.user.service.UserCentosService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class UserCentosController {

    @Autowired
    private UserCentosService userCentosService;

    @GetMapping("/favorite")
    public ResponseEntity<List<Sku>> checkFavorite(Long id){
        List<Sku> favoriteList = userCentosService.getFavorite(id);
        return ResponseEntity.ok(favoriteList);
    }


}
